<?php

namespace Proj\ResmanBundle\Form;

use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolverInterface;

class ProjectUpdateType extends AbstractType
{
    public function buildForm(FormBuilderInterface $builder, array $options)
    {
        $builder
            ->add('name',null,array('label' => 'Nume'))
            ->add('description','textarea',array('label' => 'Descriere'))
            ->add('startDate', 'date',array('label' => 'Data inceperii'))
            ->add('endDate', 'date',array('label' => 'Data finalizarii'))
            ->add('state', 'choice', array('label' => 'Stare', 'choices' => array('Neinceput', 'In progres', 'Terminat')))
            ->add('type', 'choice', array('label' => 'Tip', 'choices' => array('Cercetare', 'Administrativ')))
        ;
    }

    public function setDefaultOptions(OptionsResolverInterface $resolver)
    {
        $resolver->setDefaults(array(
            'data_class' => 'Proj\ResManBundle\Entity\Project'
        ));
    }

    public function getName()
    {
        return 'proj_resmanbundle_projectstype';
    }
}